package com.shensi.api.admin.client.station;

import com.shensi.api.admin.client.fallback.monitor.SysLogininforClientFallBack;
import com.shensi.api.admin.domian.station.dto.CardBatchDto;
import com.shensi.api.admin.domian.station.dto.PhysicalCardBalanceDto;
import com.shensi.api.admin.domian.station.dto.PhysicalCardDto;
import com.shensi.api.admin.domian.station.dto.PhysicalCardListDto;
import com.shensi.api.admin.domian.station.dto.PhysicalCardOrderDto;
import com.shensi.api.admin.domian.station.dto.PhysicalCardSecretKeyDto;
import com.shensi.common.core.constant.CloudConstant;
import com.shensi.common.core.domain.AjaxResult;
import com.shensi.common.core.page.TableDataInfo;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


/**
 * @author mao
 */
@FeignClient(
        value = CloudConstant.ADMIN_SERVER,
        fallbackFactory = SysLogininforClientFallBack.class)
@Component
public interface PhysicalCardExternalClient {


    /**实体卡充值*/
    @PostMapping("/external/recharge")
    public AjaxResult recharge(@RequestBody PhysicalCardBalanceDto physicalCardBalanceDto);


    @PostMapping("/external/consumption")
    public AjaxResult consumption(@RequestBody PhysicalCardOrderDto physicalCardOrderDto);

    /**
     * 查询单个卡信息
     * */
    @GetMapping("/external/get")
    public AjaxResult getByNo(@RequestParam("physicalCardNo") String physicalCardNo);


    /**
     * 新增实体卡  复制实体卡
     *
     * 双屏机、pos机开卡
     * */
    @PostMapping("/external/add")
    public AjaxResult addPhysicalCard(@RequestBody PhysicalCardDto physicalCard);

    @PostMapping("/external/withdraw")
    public AjaxResult withdraw(@RequestParam("physicalCardNo") String physicalCardNo);

    @GetMapping("/external/stations")
    public AjaxResult getStations(@RequestParam("stationId") Long stationId);

    /** 修改实体卡状态注销状态*/
    @PostMapping("/external/update/status")
    public AjaxResult updatePhysicalCardStatus(@RequestBody PhysicalCardDto physicalCard);


}
